﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Streambolics
{
    /// <summary>
    ///     A way to indicate an on/off status.
    /// </summary>
    /// <example>
    ///     Whether a door is open or closed.
    /// </example>
    /// <remarks><para>
    ///     As usual, producers are polled and do not raise an event when the
    ///     status changes.
    /// </para></remarks>

    interface IStatusProducer
    {
        
        /// <summary>
        ///     Whether the status is currently detected.
        /// </summary>
        /// <remarks><para>
        ///     The value should be true if the status is known to be on, false
        ///     if the status is known to be off, and unknown if the status cannot
        ///     be assessed.
        /// </para></remarks>

        Ternary Detected
        {
            get;
        }

        /// <summary>
        ///     The time since the status is in its current state.
        /// </summary>
        /// <remarks><para>
        ///     Return DateTime.Max if this is not known. Do not return null.
        /// </para></remarks>

        DateTime Since
        {
            get;
        }
    }
}
